/**
 * Created by commy on 2015/5/1.
 */

var merge =  require('utils-merge');
var config = {

};

var codingConfig = {
    redis:{
        name:"1650775e-5aca-4cb1-b960-05ec72d8d44b",
        host:"10.4.7.20",
        port:"5378",
        password:"c81bf1db-bf58-4fdb-b77c-7c51dc939d2b"
    },
    db_url:'mongodb://9b46573d-d168-475e-b235-c51dbb4204e6:9LaMrpdJ1FHXHsKRPQRYLg@10.9.27.25:27017/552c2a72-d415-43f8-9bba-eaf8f4d32c4b'

};

var oschinaConfig = {
    redis:{
        name:"1650775e-5aca-4cb1-b960-05ec72d8d44b",
        host:"10.4.7.20",
        port:"5378",
        password:"c81bf1db-bf58-4fdb-b77c-7c51dc939d2b"
    },
    db_url:'mongodb://8866c6da-e109-4378-82f2-870edf8abfb1:278b79fe-24fe-4186-9707-b798f8bdedf@10.4.9.100:25219/83b84012-3a04-4d50-817a-819ffeeada0f'
}

var localConfig = {
    redis:{
        host:"127.0.0.1",
        port:"6379"
    },
    db_url:'mongodb://localhost:27017/test'
}


if(process.env.NODE_ENV=='production'){
    module.exports = merge(config,codingConfig);
}else if(process.env.NODE_ENV=='oschina'){
    module.exports = merge(config,oschinaConfig);
}else{
    module.exports = merge(config,localConfig);
}

